package com.millstein.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.millstein.model.CouponRecordDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.millstein.request.LockCouponRequest;
import com.millstein.vo.CouponRecordVO;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author millstein
 * @since 2021-09-14
 */
public interface CouponRecordService extends IService<CouponRecordDO> {

    /**
     * 分页条件查询领券记录
     * @param page 当前页
     * @param size 每页记录数
     * @return
     */
    Page<CouponRecordVO> pageCouponRecord(int page, int size);

    /**
     * 根据id查询领券记录
     * @param id 领券记录id
     * @return
     */
    CouponRecordVO findCouponRecord(Long id);

    /**
     * 锁定优惠券
     * @param lockCouponRequest 锁定优惠券需要用到的信息
     */
    void lockCoupon(LockCouponRequest lockCouponRequest);
}
